import { Component, OnInit } from '@angular/core';
import { HttpClient , HttpHeaders } from '@angular/common/http';

@Component({
  selector: 'app-person-center',
  templateUrl: './person-center.component.html',
  styleUrls: ['./person-center.component.css']
})
export class PersonCenterComponent implements OnInit {

  public userAvatar: any = '../../assets/img/u1810.png';
  public userPhone: any = 123456789;
  public myOrderImg: any = '../../assets/img/u306.png';
  constructor(public http: HttpClient) { }

  ngOnInit() {
  //  用户注册
    const userAdd = 'http://192.168.2.228:8080/user/add';
    this.http.post(userAdd , {
      headers: new HttpHeaders({
      })
    }).subscribe((response) => {
      console.log(response);
    });
  // 用户登录
    const userLogin = 'http://192.168.2.228:8080/user/login';
    this.http.post(userLogin , {
      headers: new HttpHeaders({
      })
    }).subscribe((response) => {
      console.log(response);
    });
  }

}
